
//创建服务器
const http = require('http');
 
//将服务器回调函数引入
const serverHandler = require('./www')
    //端口
const PORT = 3000; 
 
const server = http.createServer(serverHandler);
 
server.listen(PORT, () => {
    // 监听成功执行的回调
    console.log(`server running at port ${PORT}.....`);
})